#!/usr/bin/env python

import time

from shelob import Shelob
from colors import * #@UnusedWildImport

class GoogleHacks():

    def __init__(self):
        self.spider = Shelob()
        self.parameters = {'inurl': 'Only use URLs that contain a given string',
                           'depth': 'Stop at a result page number'
                           }
        self.inurl = None
        self.queries = []
        
    def splash(self):
        print bold+C+"[*]"+W+" Successfully Loaded Google Hacking Plugin!"
        
    def execute(self):
        for query in self.queries:
            self.spider.addQuery(query)
            initTime = time.time()
            fileCount = self.spider.start()
            elapsed = time.time() - initTime
            print bold+O+'[$]'+W+' Got %d file(s) in %d second(s)' % (fileCount, elapsed), W
    
    
def loadPlugin():
    return GoogleHacks()

